Add tests to remaining operations/ files#921
Merged
quietbits merged 14 commits intotypescript-migrationfrom Mar 10, 2026
Merged
Add tests to remaining operations/ files#921quietbits merged 14 commits intotypescript-migrationfrom
operations/ files#921quietbits merged 14 commits intotypescript-migrationfrom
Conversation
|
Size Change: 0 B Total Size: 3.6 MB ℹ️ View Unchanged
|
There was a problem hiding this comment.
Pull request overview
This PR migrates the classic Mocha-based test file test/unit/operations/classic_ops_test.js into individual, type-safe Vitest TypeScript test files, and adds new coverage for Operation utility methods. It's part of an ongoing effort to modernize the test suite.
Changes:
- Deletes the monolithic
classic_ops_test.jsfile (1,678 lines of Mocha JS tests) - Adds 11 new per-operation TypeScript test files under
test/unit/operations/ - Adds a new
test/unit/operation.test.tscovering_checkUnsignedIntValue,isValidAmount,_fromXDRAmount,_toXDRAmount,_fromXDRPrice, and_toXDRPrice
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
test/unit/operations/classic_ops_test.js |
Deleted — all coverage migrated to per-operation TS files |
test/unit/operations/revoke_sponsorship.test.ts |
New tests for all 7 revoke-sponsorship operations; adds new edge-case coverage |
test/unit/operations/path_payment_strict_send.test.ts |
New tests for pathPaymentStrictSend including muxed account support |
test/unit/operations/manage_sell_offer.test.ts |
New tests for manageSellOffer with all price types and source account |
test/unit/operations/manage_buy_offer.test.ts |
New tests for manageBuyOffer with all price types and source account |
test/unit/operations/liquidity_pool_deposit.test.ts |
New tests for liquidityPoolDeposit with all price types and source account |
test/unit/operations/create_passive_sell_offer.test.ts |
New tests for createPassiveSellOffer with multiple price types |
test/unit/operations/create_claimable_balance.test.ts |
New tests for createClaimableBalance including all validation cases |
test/unit/operations/clawback_claimable_balance.test.ts |
New tests for clawbackClaimableBalance including validation and source account |
test/unit/operations/claim_claimable_balance.test.ts |
New tests for claimClaimableBalance including validation and source account |
test/unit/operations/change_trust.test.ts |
New tests for changeTrust with Asset, LiquidityPoolAsset, and validation |
test/unit/operations/bump_sequence.test.ts |
New tests for bumpSequence with enhanced error message assertions |
test/unit/operation.test.ts |
New tests for Operation utility methods not tied to a specific operation |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Ryang-21
approved these changes
Mar 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.